package edu.mcw.rgd.clinminer.web.utils;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * Classic command pattern. Need a separate Spring-managed bean to use the Async
 * and Scheduled annotations, as adding them directly to Roo-managed beans does
 * not work due to some ITD/aspect clash. Spring also handles shutting down of
 * the underlying executor flawlessly.
 * 
 * @author Tomasz Adamusiak <tadamusiak@mcw.edu>
 * 
 */
@Component
public class AsyncExecutor {
	@Async
	public void run(Runnable r) {
		r.run();
	}
}
